import { Controller, Get, Post, Body, Patch, Param, Delete, UseGuards } from '@nestjs/common';
import { StageEventService } from './stage-event.service';
import { CreateStageEventDto } from './dto/create-stage-event.dto';
import { UpdateStageEventDto } from './dto/update-stage-event.dto';
import { ApiBearerAuth } from '@nestjs/swagger';
import { Auth } from 'src/common/decorators/auth.decorator';



@Auth()
@ApiBearerAuth()
@Controller('stage-event')
export class StageEventController {
  constructor(private readonly stageEventService: StageEventService) {}

  @Post()
  create(@Body() createStageEventDto: CreateStageEventDto) {
    return this.stageEventService.create(createStageEventDto);
  }

  @Get()
  findAll() {
    return this.stageEventService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.stageEventService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateStageEventDto: UpdateStageEventDto) {
    return this.stageEventService.update(+id, updateStageEventDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.stageEventService.remove(+id);
  }
}
